import json

from config import BASE_PATH


def build_data():
    filepath = BASE_PATH+"/data/login.json"
    # 创建空列表  目的：[{},{},{}] --> [(),(),()]
    arrs = []
    with open(filepath,"r",encoding="utf-8") as f:
        datas =json.load(f)
    for data in datas:
        arrs.append(tuple(data.values()))
    return arrs
def build_data_add_emp():
    filepath = BASE_PATH+"/data/add_emp.json"
    # 创建空列表  目的：[{},{},{}] --> [(),(),()]
    arrs = []
    with open(filepath,"r",encoding="utf-8") as f:
        datas =json.load(f)
    for data in datas:
        arrs.append(tuple(data.values()))
    return arrs

if __name__ == '__main__':
    print(build_data())